<?php if (hasPermission("namespaces.object.create.page")): ?>
	<form action="<?php echo Gene::makeLink($object) ?>/new/page" method="post" class="createform">
	
	<fieldset>
	<legend>Create Page</legend>
	
	<?php if ($draft): ?>
		<input type="hidden" name="draftid" value="<?php echo $draft['draft_id'] ?>" />
	<?php endif; ?>
	
	<p class="fieldlabel"><label for="pagetitle">Page Title:</label></p>
	<p class="field"><input type="text" id="pagetitle" name="objtitle" size="32" class="required" value="<?php _e($title) ?>" /></p>
	
	<p class="fieldlabel"><label for="pagedesc">Page Description: <em>(Optional)</em></label></p>
	<p class="field"><input type="text" id="pagedesc" name="objdesc" size="64" value="<?php _e($description) ?>" /></p>
	
	<p class="fieldlabel"><label for="formobjcontent">Page Content:</label></p>
	<p class="field"><?php $this->display('objects/enhancedinput', array('rows' => 12, 'required' => true, 'type' => 'full')) ?></p>
	
	<p class="formcontrols">
	<input type="submit" value="Create Page" class="btn_focus" />	
	
	<?php if ($draft || getUserProperty('drafts') < Gene::getSetting('maximum_drafts')): ?>
		<input type="submit" name="draft" value="Save Draft" class="btn_minor skipcheck" />
	<?php endif; ?>
	</p>
	
	</fieldset>
	
	</form>
<?php endif; ?>